package com.heima.behavior.controller;

import com.heima.behavior.service.ApUnlikesBehaviorService;
import com.heima.model.behavior.dtos.UnLikesBehaviorDto;
import com.heima.model.common.dtos.ResponseResult;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1/un_likes_behavior")
@RequiredArgsConstructor
@Slf4j
public class ApUnlikesBehaviorController {


    private final ApUnlikesBehaviorService apUnlikesBehaviorService;


    /**
     * 不喜欢
     * @param dto
     * @return
     */
    @PostMapping
    public ResponseResult unLike(@RequestBody UnLikesBehaviorDto dto) {

        log.info("不喜欢");

        return apUnlikesBehaviorService.unLike(dto);
    }
}